#pragma once

using namespace AppSecInc::Msi::Flags;

static const FlagMapEntry s_DirectoryServicesScopeTypes[] = 
{
    { L"DSOP_SCOPE_TYPE_TARGET_COMPUTER", DSOP_SCOPE_TYPE_TARGET_COMPUTER },
    { L"DSOP_SCOPE_TYPE_UPLEVEL_JOINED_DOMAIN", DSOP_SCOPE_TYPE_UPLEVEL_JOINED_DOMAIN },
    { L"DSOP_SCOPE_TYPE_DOWNLEVEL_JOINED_DOMAIN", DSOP_SCOPE_TYPE_UPLEVEL_JOINED_DOMAIN },
    { L"DSOP_SCOPE_TYPE_ENTERPRISE_DOMAIN", DSOP_SCOPE_TYPE_ENTERPRISE_DOMAIN },
    { L"DSOP_SCOPE_TYPE_GLOBAL_CATALOG", DSOP_SCOPE_TYPE_GLOBAL_CATALOG },
    { L"DSOP_SCOPE_TYPE_EXTERNAL_UPLEVEL_DOMAIN", DSOP_SCOPE_TYPE_EXTERNAL_UPLEVEL_DOMAIN },
    { L"DSOP_SCOPE_TYPE_EXTERNAL_DOWNLEVEL_DOMAIN", DSOP_SCOPE_TYPE_EXTERNAL_DOWNLEVEL_DOMAIN },
    { L"DSOP_SCOPE_TYPE_WORKGROUP", DSOP_SCOPE_TYPE_WORKGROUP },
    { L"DSOP_SCOPE_TYPE_USER_ENTERED_UPLEVEL_SCOPE", DSOP_SCOPE_TYPE_USER_ENTERED_UPLEVEL_SCOPE },
    { L"DSOP_SCOPE_TYPE_USER_ENTERED_DOWNLEVEL_SCOPE", DSOP_SCOPE_TYPE_USER_ENTERED_DOWNLEVEL_SCOPE },
};

static const FlagMapEntry s_DirectoryServicesScopeFlags[] =
{
    { L"DSOP_SCOPE_FLAG_STARTING_SCOPE", DSOP_SCOPE_FLAG_STARTING_SCOPE },
    { L"DSOP_SCOPE_FLAG_WANT_PROVIDER_WINNT", DSOP_SCOPE_FLAG_WANT_PROVIDER_WINNT },
    { L"DSOP_SCOPE_FLAG_WANT_PROVIDER_LDAP", DSOP_SCOPE_FLAG_WANT_PROVIDER_LDAP },
    { L"DSOP_SCOPE_FLAG_WANT_PROVIDER_GC", DSOP_SCOPE_FLAG_WANT_PROVIDER_GC },
    { L"DSOP_SCOPE_FLAG_WANT_SID_PATH", DSOP_SCOPE_FLAG_WANT_SID_PATH },
    { L"DSOP_SCOPE_FLAG_WANT_DOWNLEVEL_BUILTIN_PATH", DSOP_SCOPE_FLAG_WANT_DOWNLEVEL_BUILTIN_PATH },
    { L"DSOP_SCOPE_FLAG_DEFAULT_FILTER_USERS", DSOP_SCOPE_FLAG_DEFAULT_FILTER_USERS },
    { L"DSOP_SCOPE_FLAG_DEFAULT_FILTER_GROUPS", DSOP_SCOPE_FLAG_DEFAULT_FILTER_GROUPS },
    { L"DSOP_SCOPE_FLAG_DEFAULT_FILTER_COMPUTERS", DSOP_SCOPE_FLAG_DEFAULT_FILTER_COMPUTERS },
    { L"DSOP_SCOPE_FLAG_DEFAULT_FILTER_CONTACTS", DSOP_SCOPE_FLAG_DEFAULT_FILTER_CONTACTS }
};

static const FlagMapEntry s_DirectoryServicesScopeFilterFlags[] =
{
    { L"DSOP_FILTER_INCLUDE_ADVANCED_VIEW", DSOP_FILTER_INCLUDE_ADVANCED_VIEW },
    { L"DSOP_FILTER_USERS", DSOP_FILTER_USERS },
    { L"DSOP_FILTER_BUILTIN_GROUPS", DSOP_FILTER_BUILTIN_GROUPS },
    { L"DSOP_FILTER_WELL_KNOWN_PRINCIPALS", DSOP_FILTER_WELL_KNOWN_PRINCIPALS },
    { L"DSOP_FILTER_UNIVERSAL_GROUPS_DL", DSOP_FILTER_UNIVERSAL_GROUPS_DL },
    { L"DSOP_FILTER_UNIVERSAL_GROUPS_SE", DSOP_FILTER_UNIVERSAL_GROUPS_SE },
    { L"DSOP_FILTER_GLOBAL_GROUPS_DL", DSOP_FILTER_GLOBAL_GROUPS_DL },
    { L"DSOP_FILTER_GLOBAL_GROUPS_SE", DSOP_FILTER_GLOBAL_GROUPS_SE },
    { L"DSOP_FILTER_DOMAIN_LOCAL_GROUPS_DL", DSOP_FILTER_DOMAIN_LOCAL_GROUPS_DL },
    { L"DSOP_FILTER_DOMAIN_LOCAL_GROUPS_SE", DSOP_FILTER_DOMAIN_LOCAL_GROUPS_SE },
    { L"DSOP_FILTER_CONTACTS", DSOP_FILTER_CONTACTS },
    { L"DSOP_FILTER_COMPUTERS", DSOP_FILTER_COMPUTERS }
};

static const FlagMapEntryUINT s_DirectoryServicesDownlevelScopeFilterFlags[] =
{
    { L"DSOP_DOWNLEVEL_FILTER_USERS", DSOP_DOWNLEVEL_FILTER_USERS },
    { L"DSOP_DOWNLEVEL_FILTER_LOCAL_GROUPS", DSOP_DOWNLEVEL_FILTER_LOCAL_GROUPS },
    { L"DSOP_DOWNLEVEL_FILTER_GLOBAL_GROUPS", DSOP_DOWNLEVEL_FILTER_GLOBAL_GROUPS },
    { L"DSOP_DOWNLEVEL_FILTER_COMPUTERS", DSOP_DOWNLEVEL_FILTER_COMPUTERS },
    { L"DSOP_DOWNLEVEL_FILTER_WORLD", DSOP_DOWNLEVEL_FILTER_WORLD },
    { L"DSOP_DOWNLEVEL_FILTER_AUTHENTICATED_USER", DSOP_DOWNLEVEL_FILTER_AUTHENTICATED_USER },
    { L"DSOP_DOWNLEVEL_FILTER_ANONYMOUS", DSOP_DOWNLEVEL_FILTER_ANONYMOUS },
    { L"DSOP_DOWNLEVEL_FILTER_BATCH", DSOP_DOWNLEVEL_FILTER_BATCH },
    { L"DSOP_DOWNLEVEL_FILTER_CREATOR_OWNER", DSOP_DOWNLEVEL_FILTER_CREATOR_OWNER },
    { L"DSOP_DOWNLEVEL_FILTER_CREATOR_GROUP", DSOP_DOWNLEVEL_FILTER_CREATOR_GROUP },
    { L"DSOP_DOWNLEVEL_FILTER_DIALUP", DSOP_DOWNLEVEL_FILTER_DIALUP },
    { L"DSOP_DOWNLEVEL_FILTER_INTERACTIVE", DSOP_DOWNLEVEL_FILTER_INTERACTIVE },
    { L"DSOP_DOWNLEVEL_FILTER_NETWORK", DSOP_DOWNLEVEL_FILTER_NETWORK },
    { L"DSOP_DOWNLEVEL_FILTER_SERVICE", DSOP_DOWNLEVEL_FILTER_SERVICE },
    { L"DSOP_DOWNLEVEL_FILTER_SYSTEM", DSOP_DOWNLEVEL_FILTER_SYSTEM },
    { L"DSOP_DOWNLEVEL_FILTER_EXCLUDE_BUILTIN_GROUPS", DSOP_DOWNLEVEL_FILTER_EXCLUDE_BUILTIN_GROUPS },
    { L"DSOP_DOWNLEVEL_FILTER_TERMINAL_SERVER", DSOP_DOWNLEVEL_FILTER_TERMINAL_SERVER },
    { L"DSOP_DOWNLEVEL_FILTER_ALL_WELLKNOWN_SIDS", DSOP_DOWNLEVEL_FILTER_ALL_WELLKNOWN_SIDS },
    { L"DSOP_DOWNLEVEL_FILTER_LOCAL_SERVICE", DSOP_DOWNLEVEL_FILTER_LOCAL_SERVICE },
    { L"DSOP_DOWNLEVEL_FILTER_NETWORK_SERVICE", DSOP_DOWNLEVEL_FILTER_NETWORK_SERVICE },
    { L"DSOP_DOWNLEVEL_FILTER_REMOTE_LOGON", DSOP_DOWNLEVEL_FILTER_REMOTE_LOGON }
};

static const FlagMapEntryDWORD s_DirectoryServicesGetDcNameFlags[] =
{
	{ L"DS_AVOID_SELF", DS_AVOID_SELF },
	{ L"DS_BACKGROUND_ONLY", DS_BACKGROUND_ONLY },
	{ L"DS_DIRECTORY_SERVICE_PREFERRED", DS_DIRECTORY_SERVICE_PREFERRED },
	{ L"DS_DIRECTORY_SERVICE_REQUIRED", DS_DIRECTORY_SERVICE_REQUIRED },
	{ L"DS_FORCE_REDISCOVERY", DS_FORCE_REDISCOVERY },
	{ L"DS_GC_SERVER_REQUIRED", DS_GC_SERVER_REQUIRED },
	{ L"DS_GOOD_TIMESERV_PREFERRED", DS_GOOD_TIMESERV_PREFERRED },
	{ L"DS_IP_REQUIRED", DS_IP_REQUIRED },
	{ L"DS_IS_DNS_NAME", DS_IS_DNS_NAME },
	{ L"DS_IS_FLAT_NAME", DS_IS_FLAT_NAME },
	{ L"DS_KDC_REQUIRED", DS_KDC_REQUIRED },
	{ L"DS_ONLY_LDAP_NEEDED", DS_ONLY_LDAP_NEEDED },
	{ L"DS_PDC_REQUIRED", DS_PDC_REQUIRED },
	{ L"DS_RETURN_DNS_NAME", DS_RETURN_DNS_NAME },
	{ L"DS_RETURN_FLAT_NAME", DS_RETURN_FLAT_NAME },
	{ L"DS_TIMESERV_REQUIRED", DS_TIMESERV_REQUIRED },
	{ L"DS_WRITABLE_REQUIRED", DS_WRITABLE_REQUIRED },
};